from icmpRtt import icmp 
import logging

logger = logging.getLogger("scantopo.icmpRtt")
def testDiff(hosts,count = 20):
    logger.debug("----------------------testDiff------------------\n")
    averl = []
    for i in hosts:
        ip = "10.0.0."+i
        if i < 16:
            mac = "00:00:00:00:00:0"+hex(int(i)).split('x')[1]
        else:
            mac = "00:00:00:00:00:"+hex(int(i)).split('x')[1]
        logger.debug("ip",ip)
        aver = icmp(ip,mac,count)
        #print aver
        averl.append(aver)
    return averl
        #print  " aver is :", aver
        #print "---------------------------------\n"

if __name__ =="__main__":
    #a =  raw_input("hosts\' number:")
    #hosts = a.split(' ')
    hosts=[]
    for i in range(2,14):
        hosts.append(str(i))
    #hosts = ['2,'10']
    averl = testDiff(hosts,40)
    print averl
